<template>
  <div v-else-if="this.$props.fromType===1" class="news-add-report-frame">
    <div class="news-add-report-border">
      <div class="news-add-report-head-title">
        <span><span class="news-add-report-red-dot">*&nbsp;</span>{{this.$props.headTitle}}</span>
        <div class="news-add-report-sub-title">
          <span>{{this.$props.headSonTitle}}</span>
        </div>
      </div>
    </div>
    <div class="news-add-report-file-frame">
      <SingleFileContent  :titleImg='""' :fromType="1" :fileType='".pdf"':queryNum=0 :maxImg=1 :typeImg=1
                            :fileUrlsArray="this.fileUrlsArray"  @getFileUrls="getFileUrls" ></SingleFileContent>
    </div>
  </div>
</template>
<script>
  import SingleFileContent from 'components/fileUpload/singleFileContent.vue';
  export default {
    components: {
      SingleFileContent
    },
    props: {
      headTitle: {
        type: String
      },
      headSonTitle: {
        type: String
      },
      roleType: {
        type: Number
      },
      fileUrlsArray: {
        type: Array
      }
    },
    data() {
      return {
        titleImage: '',
        fileNameArr: [],
        fileUrlArr: []
      };
    },
    methods: {
      getFileUrls(titleImg, fileNameArray, fileUrlArray) {
        this.titleImage = titleImg;
        this.fileNameArr = fileNameArray;
        this.fileUrlArr = fileUrlArray;
        this.$emit('getFileUrls', this.titleImage, this.fileNameArr, this.fileUrlArr);
      }
    }
  };
</script>
<style>
  .news-add-report-frame {
    width: 958px;
    height: 250px;
    margin-top: -20px;
    background-color: white;
    border: 0px solid #e5e5e5;
  }
  .news-add-report-border {
    border-bottom: 0px dashed #e5e5e5;
  }
  .news-add-report-file-frame {
    padding-top: 15px;
    margin-left: 20px;
    height: auto;
    width: 900px;
    background-color: white;
  }
  .news-add-report-head-title {
    margin-left: 20px;
    margin-top: 15px;
    font-size: 14px;
    color: #333333;
  }
  .news-add-report-sub-title {
    margin-left: 0px;
    margin-top: 10px;
    height: 30px;
    font-size: 12px;
    color: #b2b2b2;
  }
  .news-add-report-red-dot{
    color:#ff6c2b;
    font-size:21px;
    position:relative;
    top:8px;
  }
</style>
